<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Web记事本</title>
</head>
<body>


<script language="JavaScript">
        function changeContent(){
            var $textarea = document.getElementsByClassName('content');
            var $pre = document.getElementsByClassName('pre');
            $pre[0].innerHTML = $textarea[0].value;
        }

        function ClearTextArea(){
            javascript:document.getElementById('textValue').value=''
        }
</script>

<form action="/save2Txt" method="post">
    <textarea id="textValue" name="textValue" class="content" placeholder="请输入内容" oninput="changeContent()"
              rows="30" cols="100"></textarea>
    <p/>
    <input type="submit" value="保存并提交"></input>
    <input type="button" value="清空" onclick="ClearTextArea()"></input>
</form>

<!--<form >-->
    <!--<input type="button" value="清空" onclick="ClearTextArea()"></input>-->
<!--</form>-->


</body>
</html>